//
//  UIButton+Extension.swift
//  RuiLinWeibo
//
//  Created by Caesar on 15/10/15.
//  Copyright © 2015年 Caesar. All rights reserved.
//

import UIKit

extension UIButton {
    
    convenience init(title: String, imageName: String, fontSzie: CGFloat = 12, color: UIColor = UIColor.darkGrayColor()) {
        
        self.init()
        
        setTitle(title, forState: UIControlState.Normal)
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setTitleColor(color, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSzie)
    }
}
